package com.anywhere.ms.base.jpa;

import javax.persistence.*;
import java.util.Date;

@MappedSuperclass
public abstract class BaseModel extends IdBaseModel {

    @Column(name = "uuid", nullable = false, unique = true, length = 64, updatable = false)
    private String uuid;

    @Column(name = "time_created", nullable = false, updatable = false)
    private Date timeCreated;

    public BaseModel() {
        timeCreated = new Date();
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public Date getTimeCreated() {
        return timeCreated;
    }

    public void setTimeCreated(Date timeCreated) {
        this.timeCreated = timeCreated;
    }
}
